﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Betop.Lib.Data;

namespace Betop.Lib.Core.Log.Message
{
    public partial class LogMessageInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "LogMessage";
        }
        public override string GetInsertSql()
        {
            return "insert into LogMessage ( [ID], [Name], [Message], [InputTime]) values ( @ID, @Name, @Message, @InputTime)";
        }
        public override string GetUpdateSql()
        {
            return "update LogMessage set  [ID] = @ID, [Name] = @Name, [Message] = @Message, [InputTime] = @InputTime where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Guid ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Message
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Guid)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "message":
                    this.Message = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "message":
                    return this.Message;
                case "inputtime":
                    return this.InputTime;
                default:
                    return null;
            }
        }
    }



}
